<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<script src="../resource/jquery-2.1.1.js"></script>
	<script src="../resource/highchart/highstock.src.js"></script>
</head>
<body>
<div class="chart" style="height: 500px;">

</div>
<script>
	$(function () {
		var dataset = [];

		dataset.push({
			name: "曲线1",
			data: []
		});
		dataset.push({
			name: "曲线2",
			data: []
		});
		dataset.push({
			name: "曲线3",
			data: []
		})
		for (var i = 0; i < 100; i++) {
			var date = new Date().getTime() + (100000 * i);

			dataset[0].data.push([
				date,
				Math.random() * 100
			])
			dataset[1].data.push([
				date,
				Math.random() * 100
			])
			dataset[2].data.push([
				date,
				Math.random() * 100
			])
		}



		$(".chart").highcharts({
			title: {
				text: ""
			},
			chart: {
				height: 300
			},
			credits: { enabled: false },
			rangeSelector: {
				buttons: [],
				inputEnabled: false,
				selected: 1,
				enabled: false
			},
			tooltip: {
				xDateFormat: '%Y-%m-%d %H:%M:%S',
				valueSuffix: '',
				crosshairs: true,
				shared: true
			},

			xAxis: {
				type: 'datetime',
				dateTimeLabelFormats: {
					second: '%H:%M:%S',
					minute: '%H:%M',
					hour: '%H:%M',
					day: '%Y-%m-%d',
					week: '%Y-%m-%d',
					month: '%Y-%m',
					year: '%Y'
				}
			},
			legend: {
				enabled: true,
				shadow: false
			},
			yAxis: [
				{
					title: {
						text: '温度'
					}
				}

			],
			series: dataset,
//					[
//				{
//					name: '曲线1',
//					data: [
//						[Date.UTC(1970, 9, 27), 0   ],
//						[Date.UTC(1970, 10, 10), 0.6 ],
//						[Date.UTC(1970, 10, 18), 0.7 ],
//						[Date.UTC(1970, 11, 2), 0.8 ],
//						[Date.UTC(1970, 11, 9), 0.6 ],
//						[Date.UTC(1970, 11, 16), 0.6 ],
//						[Date.UTC(1970, 11, 28), 0.67],
//						[Date.UTC(1971, 0, 1), 0.81],
//						[Date.UTC(1971, 0, 8), 0.78],
//						[Date.UTC(1971, 0, 12), 0.98],
//						[Date.UTC(1971, 0, 27), 1.84],
//						[Date.UTC(1971, 1, 10), 1.80],
//						[Date.UTC(1971, 1, 18), 1.80],
//						[Date.UTC(1971, 1, 24), 1.92],
//						[Date.UTC(1971, 2, 4), 2.49],
//						[Date.UTC(1971, 2, 11), 2.79],
//						[Date.UTC(1971, 2, 15), 2.73],
//						[Date.UTC(1971, 2, 25), 2.61],
//						[Date.UTC(1971, 3, 2), 2.76],
//						[Date.UTC(1971, 3, 6), 2.82],
//						[Date.UTC(1971, 3, 13), 2.8 ],
//						[Date.UTC(1971, 4, 3), 2.1 ],
//						[Date.UTC(1971, 4, 26), 1.1 ],
//						[Date.UTC(1971, 5, 9), 0.25],
//						[Date.UTC(1971, 5, 12), 0   ]
//					]
//				}
//			],
			plotOptions: {
				line: {
					connectNulls: true
				}
			}
		})
	});
</script>

</body>
</html>